<?php

return [
    'id'                  => 'app-console',
    'basePath'            => APP_PATH . DS . 'app',
    'vendorPath'          => APP_PATH . DS . 'vendor',
    'runtimePath'         => APP_PATH . DS . 'runtime',

    'controllerNamespace' => 'app\commands',
    'bootstrap'           => ['log'],
    'aliases'             => [
        '@Overtrue/Pinyin' => '@app/vendor/pinyin/src',
    ],
    'components'          => [
        'mailer'     => [
            'class'            => 'yii\swiftmailer\Mailer',
            'useFileTransport' => true,
        ],
        'cache'   => [
            'class' => 'yii\redis\Cache',
            'redis' => [
                'hostname' => '127.0.0.1',
                'port'     => 6379,
                'database' => 5,
            ],
        ],
        'urlManager' => [
            'baseUrl'         => 'www.mlem.me',
            'hostInfo'        => 'http://',
            'enablePrettyUrl' => true,
            'showScriptName'  => false,
            'rules'           => [

            ],
        ],
        'log'        => [
            'traceLevel' => 3 ,
            'targets'    => [
                [
                    'class'       => 'yii\log\FileTarget',
                    'levels'      => ['info', 'error'],
                    //'categories'  => ['api_order'],
                    'logFile'     => '@app/runtime/logs/application.log',
                    'maxFileSize' => 1024 * 10,
                    'maxLogFiles' => 20,
                    'logVars'     => [],
                ],
            ],
        ],
    ],
    'params'              => require __DIR__ . '/params.php',
];
